package com.tomcat.MyServletDemo;

import com.tomcat.servlet.HttpServlet;
import com.tomcat.servlet.HttpServletRequest;
import com.tomcat.servlet.HttpServletResponse;
import com.tomcat.util.ResponseUtil;
import com.tomcat.webServlet.WebServlet;

import java.io.IOException;

@WebServlet(urlMapping = "/second")
public class SecondServlet extends HttpServlet {
    @Override
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
        response.GetWrite(ResponseUtil.getResponseHeader200("this is get method"));
    }

    @Override
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
        response.GetWrite(ResponseUtil.getResponseHeader200("this is post method"));
    }
}
